package cn.sdstudio.service.impl;

import cn.sdstudio.mapper.RelicItemMapper;
import cn.sdstudio.service.RelicItemService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import cn.sdstudio.vo.FavoriteVO;
import cn.sdstudio.entity.Collect;
import cn.sdstudio.entity.RelicItem;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;

@Service
public class RelicItemServiceImpl extends ServiceImpl<RelicItemMapper, RelicItem> implements RelicItemService {
    @Autowired

    private  RelicItemMapper relicItemMapper;
    @Override
    public int addCollect(Collect collect) {
        return relicItemMapper.addCollect(collect);
    }

    @Override
    public List<FavoriteVO> getMyCollect(int userid) {
        return relicItemMapper.getMyCollect(userid);
    }

    @Override
    public int deleteFavorite(int id,int userid) {
        return relicItemMapper.deleteFavorite(id,userid);
    }
}